package dto

import (
	"lib/db"
)

func GetIncomeCount(orderId string) (int64, error) {
	var count int64
	err := db.GetDb().Table("sys_incomes").Where("order_id = ?", orderId).Where("paid_at is not null").Count(&count).Error
	return count, err
}
